/**********************************************************************
 * Project : WoWGuildRoster (http://www.codeplex.com/WowGuildRoster/)
 * Module  : DotNetWarcraft.WoWGuildRoster.UI.DNN.WGR_StatList
 **********************************************************************
 * 
 * 
 * 
 **********************************************************************
 * License : All code is subject to licensing terms per the Microsoft
 *   Permissive License (Ms-PL) v1.1. For full license information,
 *   refer to the packaged license.txt file.
 **********************************************************************
 * Revision History:
 * -----------------
 * 2007-09-02 -- Cliff Simpkins: Initial Version
 **********************************************************************
 */
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using DotNetNuke;
using DotNetNuke.Common;
using DotNetNuke.Common.Utilities;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Services.Localization;
using DotNetNuke.Services.Exceptions;

using WGR_Business = DotNetWarcraft.WoWGuildRoster.Business;

namespace DotNetWarcraft.WoWGuildRoster.UI.DNN {
  public partial class WGR_StatList : PortalModuleBase {
    #region Public Properties
    public int ParentModuleID {
      get {
        try {
          return int.Parse(lblParentModuleID.Text);
        } catch {
          return -1;
        }
      }
      set {
        lblParentModuleID.Text = value.ToString();
      }
    }
    #endregion
    #region Public Methods
    public List<WGR_Business.GuildEntryStat> StatList {
      set {
        dgStatList.DataSource = value;
        dgStatList.DataBind();
      }
    }
    public String StatListTitle {
      set {
        lblStatListTitle.Text = value;
        lblStatListTitle.Visible = (value != "");
      }
    }
    #endregion
    #region Protected Methods
    protected void BindDataToDatagrid() {

      if (this.ParentModuleID > 0) {

        dgStatList.DataBind();
      }
    }

    #endregion

    protected void Page_Load(object sender, EventArgs e) {
      try {
        if (!Page.IsPostBack) {
        }
      } catch (Exception exc) {
        Exceptions.ProcessModuleLoadException(this, exc);
      }

    }

    #region Events - Data Grid
    #endregion
  }
}